import axios from './axios'
import qs from 'qs'
import {bppUrl} from '@/config/config'
// 今日汇总 /agent-data-center/todayData/getSummaryTodayByCondition
export const getSummaryToday = (data) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: bppUrl + '/agent-data-center/todayData/getSummaryTodayByCondition',
            method: 'post',
            params: data
        }).then(res => {
            resolve(res.data)
        })
    })
}
// 过去七天收益 /agent-data-center/todayData/listProfitWeekByDate
export const getLastWeek = (data) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: bppUrl + '/agent-data-center/todayData/listProfitWeekByDate',
            method: 'post',
            params: data
        }).then(res => {
            resolve(res.data)
        })
    })
}
// 过去七天新增用户 /agent-data-center/todayData/listUserSevenDayByDate
export const getLastWeekUsers = (data) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: bppUrl + '/agent-data-center/todayData/listUserSevenDayByDate',
            method: 'post',
            params: data
        }).then(res => {
            resolve(res.data)
        })
    })
}
// 用户数据统计 /agent-data-center/todayData/listUsersDataByMoblie
export const getUsers = (data) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: bppUrl + '/agent-data-center/todayData/listUsersDataByMoblie',
            method: 'post',
            params: data
        }).then(res => {
            resolve(res.data)
        })
    })
}
// 获取今日数据 /agent-center/news/list
export const getTodayData = (data) => {
	// console.log(params)
    return new Promise((resolve,reject) => {
        axios({
            url: bppUrl + '/agent-center/news/list',
            method: 'get',
            params: data
        }).then(res => {
            resolve(res.data)
        })
    })
}